package response

import (
	"time"
	"vue-admin-server/global"
	"vue-admin-server/model/product"
)

type ReliabilityReportResp struct {
	global.GVA_MODEL
	TestTime time.Time `json:"test_time"`
}

type ReliabilityData struct {
	ID            uint                          `gorm:"id"`
	ReportID      uint                          `json:"report_id"`
	Position      string                        `json:"position"`
	Sn            string                        `json:"sn"`
	Project       string                        `json:"project"`
	ModuleType    string                        `json:"module_type"`
	AgingCurrent  string                        `json:"aging_current"`
	State         string                        `json:"state"`
	FinalPower    string                        `json:"final_power"`
	Af            string                        `json:"af"`
	TotalTestTime string                        `json:"total_test_time"`
	WeekDatas     []product.ReliabilityWeekData `json:"weeks"`
}

type ChipReliabilityReport struct {
	ChipID        uint      `json:"chip_id"`
	Supplier      string    `json:"supplier"`
	ChipNo        string    `json:"chip_no"`
	RaycusNo      string    `json:"raycus_no"`
	TestTime      time.Time `json:"test_time"`
	TestContent   string    `json:"test_content"`
	ModuleType    string    `json:"module_type"`
	ReportFileURL string    `json:"report_file_url"`
	// 测试结果
	RatedCurrent                    string            `json:"rated_current"`
	RatedPower                      string            `json:"rated_power"`
	RatedJunctionTemperature        string            `json:"rated_junction_temperature"`
	RatedJunctionTemperatureKelvin  string            `json:"rated_junction_temperature_kelvin"`
	BurnInCurrent                   string            `json:"burn_in_current"`
	BurnInPower                     string            `json:"burn_in_power"`
	BurnInJunctionTemperature       string            `json:"burn_in_junction_temperature"`
	BurnInJunctionTemperatureKelvin string            `json:"burn_in_junction_temperature_kelvin"`
	ActivationEnergy                string            `json:"activation_energy"`
	XFactor                         string            `json:"x_factor"`
	YFactor                         string            `json:"y_factor"`
	BoltzmannConstant               string            `json:"boltzmann_constant"`
	CurrentAccelerationFactor       string            `json:"current_acceleration_factor"`
	PowerAccelerationFactor         string            `json:"power_acceleration_factor"`
	TemperatureAccelerationFactor   string            `json:"temperature_acceleration_factor"`
	TotalAccelerationFactor         string            `json:"total_acceleration_factor"`
	ConfidenceCoefficient           string            `json:"confidence_coefficient"`
	InvalidNumber                   string            `json:"invalid_number"`
	ChiSquare                       string            `json:"chi_square"`
	TotalTestTime                   string            `json:"total_test_time"`
	FailureRate                     string            `json:"failure_rate"`
	MeanTimeBetweenFailure          string            `json:"mean_time_between_failure"`
	AccelerationFactor              string            `json:"acceleration_factor"`
	RatedFailureRate                string            `json:"rated_failure_rate"`
	AcceleratedFailureRate          string            `json:"accelerated_failure_rate"`
	Params                          []ReliabilityData `json:"params"`
}
